//配送单数据配置
//主数据表格配置
export const columns =  [
  // { title: '销售单号', dataIndex: 'saleOrderNo', key: 'saleOrderNo', align: 'center',scopedSlots: { customRender: '' }},
  { title: '配送单号', dataIndex: 'deliveryOrderNo', key: 'deliveryOrderNo', align: 'center',scopedSlots: { customRender: 'deliveryOrderNo' }},
  { title: '配送单名称', dataIndex: 'deliveryOrderName', key: 'deliveryOrderName', align: 'center'},
  { title: '客户名称', dataIndex: 'customerName', key: 'customerName', align: 'center' },
  { title: '送货类型', dataIndex: 'deliveryType', key: 'deliveryType', align: 'center' },
  { title: '寄件人姓名', dataIndex: 'sender', key: 'sender', align: 'center' },
  { title: '寄件人联系电话', dataIndex: 'senderTel', key: 'senderTel', align: 'center' },
  { title: '收件人姓名', dataIndex: 'receiver', key: 'receiver', align: 'center' },
  { title: '收件人联系电话', dataIndex: 'receiverTel', key: 'receiverTel', align: 'center' },
  { title: '收件地址', dataIndex: 'receiverAddr', key: 'receiverAddr', align: 'center' },
  { title: '配送状态', dataIndex: 'deliveryState', key: 'deliveryState', align: 'center', scopedSlots: { customRender: 'deliveryState' } },
  { title: '操作', dataIndex: 'action', key: 'operation', width: 70, align: 'center', scopedSlots: { customRender: 'action' }},
]
//主数据明细columns
export const columnsDetail=[]

//主数据查询配置
export const q_formInfos = [
  { label: '客户名称', name: 'customerPid', type: 'customer', placeholder: '客户名称' },
  { label: '送货类型', name: 'deliveryType', type: 'dicselect',dicName:'deliveryType', placeholder: '送货类型' },
  { label: '配送单号', name: 'deliveryOrderNo', type: 'input', placeholder: '配送单号' },
  // { label: '配送状态', name: 'deliveryState', type: 'select',options:{}, placeholder: '配送状态' },
  
  { label: ['查询', '重置'], type: 'botton' }
]

export const q_formDatas = {
  deliveryType:null,
  deliveryOrderNo:null,
  customerPid: null,
  deliveryState:null
}

//添加主数据表单配置
export const s_FormInfo = [
  { label: '结算单号', name: 'settlementPid', type: 'settlementSelect', placeholder: '请选择结算单' },
  { label: '关联销售订单', name: 'saleOrderNo', type: 'input', placeholder: '请输入关联销售订单' },
  { label: '买方单位', name: 'customerName', type: 'input', placeholder: '请输入买方单位' },
  { label: '买方税号', name: 'customerTaxNo', type: 'input', placeholder: '请输入买方税号' },
  { label: '买方地址电话', name: 'customerAddrTell', type: 'input', placeholder: '请输入买方地址电话' },
  { label: '买方银行账号', name: 'customerAccountNum', type: 'input', placeholder: '请输入买方银行账号' },
  { label: '开具单位', name: 'supplierOrgName', type: 'input', placeholder: '请输入开具单位' },
  { label: '开具单位税号', name: 'supplierTaxNo', type: 'input', placeholder: '请输入开具单位税号' },
  { label: '开具单位地址电话', name: 'supplierAddrTel', type: 'input', placeholder: '请输入开具单位地址电话' },
  { label: '开具单位银行账号', name: 'supplierAccountNum', type: 'input', placeholder: '请输入开具单位银行账号' },
  { label: '发票种类', name: 'invoiceType', type: 'dicselect',dicName:'invoiceClass', placeholder: '请输入发票种类' },
  { label: '发票号码', name: 'invoiceNo', type: 'input', placeholder: '请输入发票号码' },
  { label: '发票代码', name: 'invoiceCode', type: 'input', placeholder: '请输入发票代码' },
  { label: '红票标志', name: 'redFlag', type: 'input', placeholder: '请输入红票标志' },
  { label: '无税总价', name: 'totalIunitprice', type: 'input', placeholder: '请输入无税总价' },
  { label: '含税总价', name: 'totalPrice', type: 'input', placeholder: '请输入含税总价' },
  { label: '税率', name: 'tax', type: 'dicselect',dicName:'tax', placeholder: '请选择税率' },
  { label: '税额', name: 'taxes', type: 'input', placeholder: '请输入税额' },
  { label: ['保存', '重置'], type: 'botton' }
]
export const s_formDatas = {
  sysSeq: null,
  pid: null,
  saleOrderNo: null,
  purOrderNo: null,
  customerOrgPid: null,
  settlementPid: null,
  settlementNo: null,
  customerName: null,
  customerTaxNo: null,
  customerAddrTell: null,
  customerAccountNum: null,
  supplierOrgName: null,
  supplierTaxNo: null,
  supplierAddrTel: null,
  supplierAccountNum: null,
  invoiceType: '蓝字发票',
  invoiceNo: null,
  invoiceCode: null,
  redFlag: null,
  totalIunitprice: null,
  totalPrice: null,
  tax: null,
  taxes: null,
  invoiceState: null
}
export const s_rules = {
  invoiceType: [{ required: true, message: '发票类型必填', trigger: 'blur' }],
  supplierOrgName: [{ required: true, message: '开票单位必填', trigger: 'blur' }],
  invoiceNo: [{ required: true, message: '发票号码必填', trigger: 'blur' }],
  supplierName: [{ required: true, message: '供应商名称必选', trigger: 'blur' }],
  totalIunitprice: [{ required: true, message: '结算金额无税总价必填', trigger: 'change' }],
  totalPrice: [{ required: true, message: '结算金额含税总价必填', trigger: 'change' }],
}

//查看明细显示配置
export const infoDatas = [
  { title: '结算单号', id: 'settlementNo', value: '' },
  { title: '关联销售订单', id: 'saleOrderNo', value: '' },
  { title: '关联采购订单', id: 'purOrderNo', value: '' },
  { title: '买方单位', id: 'customerName', value: '' },
  { title: '买方税号', id: 'customerTaxNo', value: '' },
  { title: '买方地址电话', id: 'customerAddrTell', value: '' },
  { title: '买方银行账号', id: 'customerAccountNum', value: '' },
  { title: '开具单位', id: 'supplierOrgName', value: '' },
  { title: '开具单位税号', id: 'supplierTaxNo', value: '' },
  { title: '开具单位地址电话', id: 'supplierAddrTel', value: '' },
  { title: '开具单位银行账号', id: 'supplierAccountNum', value: '' },
  { title: '发票种类', id: 'invoiceType', value: '' },
  { title: '发票号码', id: 'invoiceNo', value: '' },
  { title: '发票代码', id: 'invoiceCode', value: '' },
  { title: '红票标志', id: 'redFlag', value: '' },
  { title: '无税总价', id: 'totalIunitprice', value: '',style:'fontWeight:bolder',toFixed2:true  },
  { title: '含税总价', id: 'totalPrice', value: '' ,style:'fontWeight:bolder',toFixed2:true },
  { title: '税率', id: 'tax', value: '',type:'percentage' },
  { title: '税额', id: 'taxes', value: '' },
  { title: '状态', id: 'invoiceState', value: '' }
]
